package com.jwb.pub.serviceImpl;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import com.jwb.pub.service.AsyncService;

@Service
public class AsyncServiceImpl implements AsyncService{

	@Override
	@Async
	public void asyncSleep(int index, int time) {
		try {
            Thread.sleep(time * 1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("task: "+index+" end");
	}
	
}
